#ifndef     __CTRL_H
#define     __CTRL_H

#include "../utils/nocopyable.h"
#include <stdint.h>

namespace ice_driver {

class Ctrl : NoCopyable {

public:
    enum class Parts : uint8_t {
        PUMP = 0x00,
        VALVE = 0x01,
        FAN = 0x02,
        DROP_ICE = 0x03,
        STIR = 0x04,
        COMPR = 0x05,
    };

    void init();

    void stir_motor_open();
    void stir_motor_close();

    void open(Parts parts);
    void close(Parts parts);
    void close_all();

    uint8_t state();
};

extern Ctrl ctrl;

}


#endif
